load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_deps", "skia_filegroup")

licenses(["notice"])

exports_files_legacy()

skia_filegroup(
    name = "srcs",
    testonly = True,
    srcs = [
        "RasterWindowContext_mac.mm",
        "WindowContextFactory_mac.h",
        "Window_mac.h",
        "Window_mac.mm",
        "main_mac.mm",
    ] + select({
        # TODO(kjlubick, jmbetancourt) Graphite backend
        "//src/gpu:gl_ganesh": ["GLWindowContext_mac.mm"],
        "//src/gpu:metal_ganesh": ["MetalWindowContext_mac.mm"],
        "//conditions:default": [],
    }),
    visibility = ["//tools/sk_app:__pkg__"],
)

skia_cc_deps(
    name = "deps",
    testonly = True,
    linkopts = [
        "-framework",
        "OpenGL",
        "-framework",
        "QuartzCore",
        "-framework",
        "Cocoa",
        "-framework",
        "Foundation",
    ],
    visibility = ["//tools/sk_app:__pkg__"],
    deps = [
        "//tools:legacy_tool_utils",
    ],
)
